package com.sz.mes.vo;

import com.diboot.core.binding.annotation.*;
import com.sz.mes.entity.GoodsTpye;
import com.sz.mes.entity.GoodsTpye;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;

/**
 * 商品类型 ListVO定义
 * @author hem
 * @version 1.0
 * @date 2023-06-14
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
public class GoodsTpyeListVO extends GoodsTpye {

    private static final long serialVersionUID = -2659602443088253583L;

    /**
     * 关联字段 ：GoodsTpye.name
     */
    @BindField(entity = GoodsTpye.class, field = "name", condition = "this.parent_id=id")
    private String parentName;

    // 绑定children
    private List<GoodsTpye> children;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;
}
